package com.study.zk.lock.simple;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author: chenhs
 * @date: Created in 6:35 2020/2/4
 **/
public class OrderCodeGenerator {

    /** 自增长序列*/
    private int i = 0;


    public String getOrderCode() {
        Date now = new Date();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss-");
        return sdf.format(now) + ++i;
    }


    public static void main(String[] args) {

    }

}
